//
//  WXPFicoReport.m
//  MexicoLoan
//
//  Created by wxp on 2025/3/11.
//

#import "WXPFicoReport.h"
#import "WXPCreditReportDetailVC.h"

@implementation WXPFicoReport

#pragma mark - lazy
- (UIImageView *)imageBig{
    if (!_imageBig) {
        _imageBig = [UIImageView new];
        _imageBig.widthHeight = XY(SCREEN_WIDTH-LEFT_MARDIN*2, (SCREEN_WIDTH-LEFT_MARDIN*2)/313*116);
        _imageBig.image = [UIImage imageNamed:@"icon-home-fico-report"];
        _imageBig.backgroundColor = [UIColor clearColor];
    }
    return _imageBig;
}

#pragma mark - 初始化
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.widthHeight = XY(SCREEN_WIDTH, 0);
        self.backgroundColor = [UIColor clearColor];
        [self addSubView];
        UITapGestureRecognizer * tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapClick:)];
        [self addGestureRecognizer:tapGestureRecognizer];
    }
    return self;
}

- (void)addSubView{
    self.imageBig.centerXTop = XY(self.width/2, 0);
    [self addSubview:self.imageBig];
    self.height = self.imageBig.bottom+LEFT_MARDIN;
}

#pragma mark - 手势点击
- (void)tapClick:(UITapGestureRecognizer * )tap{
    [NSObject clickFeedback];
    [self.imageBig addClickAnimate];
    WXPCreditReportDetailVC * vc = [WXPCreditReportDetailVC new];
    vc.type = ENUM_REPORT_FICO;
    [Global_Nav pushViewController:vc animated:true];
}


@end
